import request from '@/utils/request'
/**
 * 获取用户列表
 * **/

export function getUser(params) {
  return request({
    url: '/users',
    method: 'get',
    params
  })
}
/**
 * 添加用户
 * **/

export function addUser(data) {
  return request({
    url: '/users',
    method: 'POST',
    data
  })
}
/**
 * 删除用户
 * **/

export function delUser(id) {
  console.log(123)
  return request({
    url: `/users/${id}`,
    method: 'DELETE'
  })
}
/**
 * 修改用户
 * **/

export function editUser(data) {
  return request({
    url: `/users/${data.id}`,
    method: 'put',
    data
  })
}
/**
 * 修改用户
 * **/

export function getpermissions() {
  return request({
    url: '/permissions/simple',
    method: 'get'
  })
}
